<template>
  <div>
    <component :is="currentComponent" />
  </div>
</template>

<script setup>
import MassSend from "./MassSend/index.vue";
import NewTask from "./NewTask/index.vue";
import { shallowRef, ref, KeepAlive } from 'vue';
import emitter from "@/utils/mitt-bus";

const currentComponent = shallowRef(MassSend);

emitter.on("switchToTaskDetail", () => {
  currentComponent.value = NewTask;
})

emitter.on("switchToTaskInfo", () => {
  currentComponent.value = MassSend;
})


</script>
